﻿using Corina.Datamodel.Entities;
using Corina.Enumerations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Corina.DataContext.Service
{
    public class AvatarService : ServiceBase
    {
        public bool ExistAvatar(string connectionString, int accountId, AccountTypeValue accountType)
        {
            return DbOperator.Exists<AvatarInfo>(connectionString, new List<string>() { "AccountId", "AccountType" }, new List<object>() { accountId, (int)accountType });
        }

        public bool Update(string connectionString, AvatarInfo entity, EntityOperation operation)
        {
            return DbOperator.UpdateEntity(connectionString, entity, operation);
        }
    }
}
